#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

#define N 5

void runChild()
{
  int cnt = 5;
  while(cnt)
  {
    printf("I'm chld, my pid:%d", getpid());
    sleep(1);
    cnt--;
  }
}

int main()
{
    int i = 0;
    for(; i < N; ++i)
    {
        pid_t id = fork();
        if(id == 0)
        {
          runChild();
          exit(0);
        }
    }
    sleep(100);
    return 0;
}
